#pragma once
#include"common.hpp"
class CentralCache
{
public:
	static CentralCache* GetInstance()
	{
		return &_sInst;
	}
	size_t FetchRangeObj(void*& start, void*& end, size_t batchnum, size_t size);
	Span* GetOneSpan(SpanList& list,size_t byte_size);
	void ReleaseListToSpan(void* start,size_t bytes);
private:
	SpanList _spanlist[NFREELIST];
	CentralCache(){}
	CentralCache(const CentralCache& cen) = delete;
	static CentralCache _sInst;
};